<script lang="ts" setup>
    import { reactive, watch,PropType } from 'vue';
    const props = defineProps({
        timeType: {
            type: String
        },
        timeData: {
            type: Object as PropType<any>
        },
        modelValue: {
            type: String
        }
    })
    const emit = defineEmits(['pickerValue', 'update:modelValue'])
    const changePicker = (v:any) => {
        emit('update:modelValue', v)
    }

</script>

<template>
    <a-week-picker 
        v-if="props.timeType==='WEEK'"
        @change="changePicker"
        class="mr-6"
        v-model="modelValue" />
    <a-month-picker 
        v-else-if="props.timeType==='MONTH'"
        @change="changePicker"
        class="mr-6"
        v-model="modelValue"/>
    <a-quarter-picker
        v-else-if="props.timeType==='QUARTER'"
        @change="changePicker"
        class="mr-6"
        v-model="modelValue"/>
    <a-date-picker 
        v-else
        @change="changePicker"
        class="mr-6"
        v-model="modelValue" />
</template>

<style lang="scss" scoped></style>